package ar.fiuba.tp7552.buildadmin.webactions;

import java.util.Collection;

import ar.fiuba.tp7552.buildadmin.dao.GenericDao;
import ar.fiuba.tp7552.buildadmin.model.builds.Edificio;

public class ShowBuildsAction extends BaseAction {
	
	private GenericDao<Edificio, Long> dao;
	private Collection<Edificio> edificios;
	
	public Collection<Edificio> getEdificios() {
		return edificios;
	}
	
	public ShowBuildsAction(GenericDao<Edificio, Long> dao) {
		super();
		this.dao = dao;
	}

	public String execute() {
		edificios = dao.getAll();
		return ShowBuildsAction.SUCCESS;
	}

}
